{% extends "stocksys/base/base_page.html" %}
{% load staticfiles %}

{% block headscript %}
    <script src="{% static 'stocksys/js/Graph.js' %}" type="text/javascript"></script>

{% endblock %}
{% block content %}
    <div class="content">
        <div class="container-fluid">
            <div class="row">
                <div id="Graph"  class="col-md-9">
                    <canvas id="myCanvas" height="800" >
                        <p>您的系统不支持此程序!</p>
                    </canvas>
                </div>
                <div class="col-md-3">
                    <table id="arguments" class="table">
                        <tr>
                        </tr>
                    </table>
                </div>
            </div>
        </div>
    </div>
{% endblock %}
{% block pagescript %}

    <script>
        var graph = new Graph('myCanvas', 'arguments');
        var load = new Node('l_1', 'Load');
        var model = new Node('m_2', 'Model');
        var output = new Node('o_3', 'Out');
        //$("#Graph").bind('resize',function () {
        //    $("#myCanvas").width($("#Graph").width());
        //    $("#myCanvas").height($("#Graph").height());
        //});
        load.addButtom(model);
        model.addButtom(output);

        graph.addNode(load);
        graph.addNode(model);
        graph.addNode(output);
        graph.draw();
        console.log(graph);
    </script>
{% endblock %}

